
public class Circle extends Figures{
	private double xCenter;
	private double yCenter;
	private double r;
	public void setWeightCenter()
	{
		this.weightCenterX = xCenter;
		this.weightCenterY = yCenter;
	
	}
	public double perimeter()
	{
		double perimeter;
		perimeter = 2*3.14*this.r;
		return perimeter;
	}
	public double area()
	{
		double area;
		area = 3.14*this.r*this.r;
		return area;
	}
	public double getRadius()
	{
		return this.r;
	}
	public Circle(double x, double y, double r)
	{
		this.xCenter = x;
		this.yCenter = y;
		this.r = r;
	}
	
	public void printInfo() {
		
		StringBuilder figureinfo = new StringBuilder();
		java.text.DecimalFormat myFormatter = new java.text.DecimalFormat(this.pattern);
				
		figureinfo.append("x:").append(myFormatter.format(xCenter)).append(" ").append("y:").append(myFormatter.format(yCenter)).
			append(" ").append("radius:").append(myFormatter.format(r));
		
		this.setWeightCenter();
		
		figureinfo.append(" ").append("perimeter:").append(myFormatter.format(this.perimeter())).append(" ").append("area:").
		 	append(myFormatter.format(this.area())).append(" ").append("Weight Center X:").append(myFormatter.format(this.weightCenterX)).
		 	append(" ").append("Weight center Y:").append(myFormatter.format(this.weightCenterY));
		String str = new String(figureinfo);
		System.out.println(str);
	}

}
